package commands;

import java.util.Date;

import Main.Command;
import net.dv8tion.jda.entities.Message;
import net.dv8tion.jda.events.channel.voice.GenericVoiceChannelEvent;
import net.dv8tion.jda.events.message.MessageReceivedEvent;
import net.dv8tion.jda.events.voice.VoiceJoinEvent;

public class DateCommand implements Command{
	private boolean cpost = true;
	private int tpost = 0;
Date date = new Date();
	@Override
	public boolean called(String[] args, MessageReceivedEvent event) {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public void action(String[] args, MessageReceivedEvent event) {
		// TODO Auto-generated method stub
		ToltalCommandUsesCommand.countT ++;
		if(cpost == false && tpost >= 25){
			tpost = 0;
			event.getTextChannel().sendMessage("Too many people are using this command. Please try later");
			try {
				Thread.sleep(10000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} 
		}
		if(cpost && tpost < 25){
			cpost = false;
			tpost ++;
			try{
	event.getTextChannel().sendMessage("The Progression of my avatars :");
	Thread.sleep(500); 
	event.getTextChannel().sendMessage("https://cdn.discordapp.com/attachments/186261194162569216/186883378757369857/shadowmuffinFirst.jpg");
	Thread.sleep(500); 
	event.getTextChannel().sendMessage("https://cdn.discordapp.com/attachments/186261194162569216/186883416057184257/shadowmuffinSecond.jpg");
	Thread.sleep(500); 
	event.getTextChannel().sendMessage("https://cdn.discordapp.com/attachments/186261194162569216/186883533841629185/SM.jpg");
	cpost = true;
			}catch(Exception e){
				
			}
		}
		}
	
	

	@Override
	public void action(String[] args, GenericVoiceChannelEvent event) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String help() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void execute(boolean success, MessageReceivedEvent event) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void action(String[] args, VoiceJoinEvent event) {
		// TODO Auto-generated method stub
		
	}

}
